            <div class="span4">
                <div class="sidebar">
                
                

                    <div class="well"> 
                    
       
                        <h5>Your Score</h5>
                        <ul>
                            <li>MH Points: <b><?php  
require_once 'i_global.php';
require_once 'func_act_edit.php';

if($_SESSION['user'] != null) {
	$points = getPoints($_SESSION['user']['user_id']);
	echo $points;
}

                            ?></b></li>
                            <li>Money raised: $<b><?php 
                            if($_SESSION['user'] != null) {
	echo getMoneyRaised($_SESSION['user']['user_id']);
}
                            ?></b>
                            
                            </li>
                        </ul>                        
                                      
                        
                        <h5>Challenges</h5>
                        <ul>
                            <li><a href="#">Top Challenges</a></li>
                            <li><a href="#">Completed Challenges</a></li>
                            <li><a href="#">Achievements</a></li>
                            <li><a href="#">Link</a></li>
                        </ul>
                        
                        <h5>Badges</h5>
                            
                            <ul class="media-grid">
<?php 

function getBadges($points) {
	$badges = array();
	if($points > 0) {
		$badges[] = 'badge01.png'; 
	}
	if($points >= 2) {
		$badges[] = 'badge02.png';
	} 
	if($points >= 4) {
		$badges[] = 'badge02.png';
	}
	if($points >= 6) {
		$badges[] = 'badge02.png';
	}
	if($points >= 8) {
		$badges[] = 'badge02.png';
	}
	return $badges;
}
$badges = getBadges($points);

foreach ($badges as &$badge) {
?>
	<li><a href="#"> <img class="thumbnail" src="_IMG/<?php echo $badge; ?>" width='36'
		alt=""> </a></li>

<?php } // end for each badge. ?>
                           
                            </ul>     
                            more...
                        
                        <h5>Leaderboard</h5>
                        <ul>
                            <li>Apek <img class="thumbnail" src="http://placehold.it/10x10" alt=""> 3450 <img class="thumbnail" src="http://placehold.it/10x10" alt="">  $56</li>
                            <li>Benny <img class="thumbnail" src="http://placehold.it/10x10" alt=""> 2300 <img class="thumbnail" src="http://placehold.it/10x10" alt="">  $56</li>                            
                            <li>Cathy <img class="thumbnail" src="http://placehold.it/10x10" alt=""> 1202 <img class="thumbnail" src="http://placehold.it/10x10" alt="">  $56</li>
                            <li>Drogba <img class="thumbnail" src="http://placehold.it/10x10" alt=""> 234 <img class="thumbnail" src="http://placehold.it/10x10" alt="">  $56</li>
                            
                        </ul>
                        
                        <h5>Settings</h5>
                        <ul>
                            <li><a href="#">Settings</a></li>
                            <li><a href="#">Log out</a></li>
                        </ul>
                    </div>                
                

                </div>

            </div>